HA$PBExportHeader$uo_ddlb.sru
forward
global type uo_ddlb from dropdownlistbox
end type
end forward

global type uo_ddlb from dropdownlistbox
integer width = 480
integer height = 400
integer textsize = -10
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
long textcolor = 33554432
boolean sorted = false
borderstyle borderstyle = stylelowered!
event type integer ue_cargar ( string as_sql )
end type
global uo_ddlb uo_ddlb

type variables
string is_cadena
long il_index
end variables

event type integer ue_cargar(string as_sql);long li_fila= 1
setpointer(hourglass!)

string   ls_col2[]
prepare sqlsa from :as_sql;
declare cursql dynamic cursor for sqlsa;
open dynamic cursql ;
fetch cursql into :gs_col1_uo_ddlb[1], :ls_col2[1];
do while sqlca.sqlcode=0 
	this.additem(ls_col2[li_fila])
	li_fila ++
	fetch cursql into :gs_col1_uo_ddlb[li_fila], :ls_col2[li_fila];
loop
if sqlca.sqlcode = -1 then
   return -1
else
	close cursql ;
	return 1
end if

setpointer(arrow!)

end event

event selectionchanged;il_index=index
end event

on uo_ddlb.create
end on

on uo_ddlb.destroy
end on

